import loadable from "@/utils/loadable";
//要从react-router-dom中导入RouteObject类型
import {RouteObject} from 'react-router-dom'
const Login=loadable(()=>import('@/views/Login'))
const Home=loadable(()=>import('@/views/Home'))

/*
    定义一个routes数组，这个数组是用来存储路由对象
    数组的中的成员的类型RouteObject
*/
const routes:Array<RouteObject>=[
    {
        path:'/login',
        element:<Login></Login>
    },
    {
        path:'/home',
        element:<Home></Home>
    }
]
export default routes